package leecode

import (
	"strings"
)

func canBeTypedWords(text string, brokenLetters string) (result int) {
	arr := strings.Split(text, " ")
	for i := 0; i < len(arr); i++ {
		flag := 1
		str := arr[i]
		for _, s := range str {
			if strings.Contains(brokenLetters, string(s)) {
				flag = 0
				break
			}
		}
		if flag == 1 {
			result++
		}
	}
	return result
}
